package com.yuandengta.yomall.product.feign;

import com.yuandengta.common.utils.R;
import com.yuandengta.yomall.product.fallback.SeckillFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 秒杀服务远程接口 {@link SeckillFeignService}
 *
 * @author Kevin
 * @email: 178676392@qq.com
 */
@FeignClient(value = "yomall-seckill", fallback = SeckillFeignServiceFallback.class)
public interface SeckillFeignService {

    /**
     * 获取商品秒杀信息
     * @param skuId
     * @return
     */
    @GetMapping("/sku/seckill/{skuId}")
    R getSkuSeckillInfo(@PathVariable("skuId") Long skuId);
}
